package com.song.shop.rabbitmq;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Topic 模式接收消息
 * @author song
 *
 */
@Component
public class TopicReceiver2 {
	
	@RabbitListener(queues = "topic.messages")
	public void process(String msg) {
		System.out.println("TopicReceiver2接收到topic.messages : "+msg);
		System.out.println("接收到topic.message的消息，可以进行下一步处理");
		/*try {
			//Thread.currentThread().sleep(3000);
			System.out.println("--sleep 3s---");
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
	}
}
